package com.minimalist.common.entity.lindi.vo.subsidyapplicationtownpayment;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.minimalist.common.utils.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Objects;

/**
 * 林地指标平台_镇街支付明细表 VO类
 *
 * @author 11987
 */
@Schema(name = "林地指标平台_镇街支付明细表实体")
public class LindiSubsidyApplicationTownPaymentVO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    // ========== 基本信息 ==========

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "subsidyApplicationId", description = "补贴申请ID", type = "string")
    private Long subsidyApplicationId;

    @NotNull(message = "镇街支付明细ID不能为空", groups = {Update.class})
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "subsidyApplicationTownPaymentId", description = "镇街支付明细ID", type = "string")
    private Long subsidyApplicationTownPaymentId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "subsidyApplicationPayNoticeId", description = "支付通知ID", type = "string")
    private Long subsidyApplicationPayNoticeId;

    @Schema(name = "townName", description = "镇街名称", type = "string")
    private String townName;

    @Schema(name = "acceptAcreage", description = "验收亩数", type = "string")
    private String acceptAcreage;

    @Schema(name = "totalAmount", description = "总金额(万元)", type = "string")
    private String totalAmount;

    @Schema(name = "paymentRadio", description = "支付比例(%)", type = "string")
    private String paymentRadio;

    @Schema(name = "currentPaymentAmount", description = "当前支付金额(万元)", type = "string")
    private String currentPaymentAmount;

    @Schema(name = "remark", description = "备注", type = "string")
    private String remark;

    // ========== 审计字段 ==========

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "createId", description = "创建人ID", type = "string")
    private Long createId;

    @Schema(name = "createName", description = "创建人姓名", type = "string")
    private String createName;

    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    @Schema(name = "createTime", description = "创建时间", type = "string")
    private LocalDateTime createTime;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "updateId", description = "更新人ID", type = "string")
    private Long updateId;

    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    @Schema(name = "updateTime", description = "更新时间", type = "string")
    private LocalDateTime updateTime;

    public LindiSubsidyApplicationTownPaymentVO() {
    }

    public LindiSubsidyApplicationTownPaymentVO(Long subsidyApplicationId, Long subsidyApplicationTownPaymentId, Long subsidyApplicationPayNoticeId, String townName, String acceptAcreage, String totalAmount, String paymentRadio, String currentPaymentAmount, String remark, Long createId, String createName, LocalDateTime createTime, Long updateId, LocalDateTime updateTime) {
        this.subsidyApplicationId = subsidyApplicationId;
        this.subsidyApplicationTownPaymentId = subsidyApplicationTownPaymentId;
        this.subsidyApplicationPayNoticeId = subsidyApplicationPayNoticeId;
        this.townName = townName;
        this.acceptAcreage = acceptAcreage;
        this.totalAmount = totalAmount;
        this.paymentRadio = paymentRadio;
        this.currentPaymentAmount = currentPaymentAmount;
        this.remark = remark;
        this.createId = createId;
        this.createName = createName;
        this.createTime = createTime;
        this.updateId = updateId;
        this.updateTime = updateTime;
    }

    public Long getSubsidyApplicationId() {
        return subsidyApplicationId;
    }

    public void setSubsidyApplicationId(Long subsidyApplicationId) {
        this.subsidyApplicationId = subsidyApplicationId;
    }

    public Long getSubsidyApplicationTownPaymentId() {
        return subsidyApplicationTownPaymentId;
    }

    public void setSubsidyApplicationTownPaymentId(Long subsidyApplicationTownPaymentId) {
        this.subsidyApplicationTownPaymentId = subsidyApplicationTownPaymentId;
    }

    public Long getSubsidyApplicationPayNoticeId() {
        return subsidyApplicationPayNoticeId;
    }

    public void setSubsidyApplicationPayNoticeId(Long subsidyApplicationPayNoticeId) {
        this.subsidyApplicationPayNoticeId = subsidyApplicationPayNoticeId;
    }

    public String getTownName() {
        return townName;
    }

    public void setTownName(String townName) {
        this.townName = townName;
    }

    public String getAcceptAcreage() {
        return acceptAcreage;
    }

    public void setAcceptAcreage(String acceptAcreage) {
        this.acceptAcreage = acceptAcreage;
    }

    public String getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(String totalAmount) {
        this.totalAmount = totalAmount;
    }

    public String getPaymentRadio() {
        return paymentRadio;
    }

    public void setPaymentRadio(String paymentRadio) {
        this.paymentRadio = paymentRadio;
    }

    public String getCurrentPaymentAmount() {
        return currentPaymentAmount;
    }

    public void setCurrentPaymentAmount(String currentPaymentAmount) {
        this.currentPaymentAmount = currentPaymentAmount;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Long getCreateId() {
        return createId;
    }

    public void setCreateId(Long createId) {
        this.createId = createId;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateId() {
        return updateId;
    }

    public void setUpdateId(Long updateId) {
        this.updateId = updateId;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        LindiSubsidyApplicationTownPaymentVO that = (LindiSubsidyApplicationTownPaymentVO) o;
        return Objects.equals(subsidyApplicationId, that.subsidyApplicationId)
                && Objects.equals(subsidyApplicationTownPaymentId, that.subsidyApplicationTownPaymentId)
                && Objects.equals(subsidyApplicationPayNoticeId, that.subsidyApplicationPayNoticeId)
                && Objects.equals(townName, that.townName)
                && Objects.equals(acceptAcreage, that.acceptAcreage)
                && Objects.equals(totalAmount, that.totalAmount)
                && Objects.equals(paymentRadio, that.paymentRadio)
                && Objects.equals(currentPaymentAmount, that.currentPaymentAmount)
                && Objects.equals(remark, that.remark)
                && Objects.equals(createId, that.createId)
                && Objects.equals(createName, that.createName)
                && Objects.equals(createTime, that.createTime)
                && Objects.equals(updateId, that.updateId)
                && Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(subsidyApplicationId, subsidyApplicationTownPaymentId, subsidyApplicationPayNoticeId, townName, acceptAcreage, totalAmount, paymentRadio, currentPaymentAmount, remark, createId, createName, createTime, updateId, updateTime);
    }

    @Override
    public String toString() {
        return "LindiSubsidyApplicationTownPaymentVO{" +
                "subsidyApplicationId=" + subsidyApplicationId +
                ", subsidyApplicationTownPaymentId=" + subsidyApplicationTownPaymentId +
                ", subsidyApplicationPayNoticeId=" + subsidyApplicationPayNoticeId +
                ", townName='" + townName + '\'' +
                ", acceptAcreage='" + acceptAcreage + '\'' +
                ", totalAmount='" + totalAmount + '\'' +
                ", paymentRadio='" + paymentRadio + '\'' +
                ", currentPaymentAmount='" + currentPaymentAmount + '\'' +
                ", remark='" + remark + '\'' +
                ", createId=" + createId +
                ", createName='" + createName + '\'' +
                ", createTime=" + createTime +
                ", updateId=" + updateId +
                ", updateTime=" + updateTime +
                '}';
    }

    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private Long subsidyApplicationId;
        private Long subsidyApplicationTownPaymentId;
        private Long subsidyApplicationPayNoticeId;
        private String townName;
        private String acceptAcreage;
        private String totalAmount;
        private String paymentRadio;
        private String currentPaymentAmount;
        private String remark;
        private Long createId;
        private String createName;
        private LocalDateTime createTime;
        private Long updateId;
        private LocalDateTime updateTime;

        public Builder subsidyApplicationId(Long subsidyApplicationId) {
            this.subsidyApplicationId = subsidyApplicationId;
            return this;
        }

        public Builder subsidyApplicationTownPaymentId(Long subsidyApplicationTownPaymentId) {
            this.subsidyApplicationTownPaymentId = subsidyApplicationTownPaymentId;
            return this;
        }

        public Builder subsidyApplicationPayNoticeId(Long subsidyApplicationPayNoticeId) {
            this.subsidyApplicationPayNoticeId = subsidyApplicationPayNoticeId;
            return this;
        }

        public Builder townName(String townName) {
            this.townName = townName;
            return this;
        }

        public Builder acceptAcreage(String acceptAcreage) {
            this.acceptAcreage = acceptAcreage;
            return this;
        }

        public Builder totalAmount(String totalAmount) {
            this.totalAmount = totalAmount;
            return this;
        }

        public Builder paymentRadio(String paymentRadio) {
            this.paymentRadio = paymentRadio;
            return this;
        }

        public Builder currentPaymentAmount(String currentPaymentAmount) {
            this.currentPaymentAmount = currentPaymentAmount;
            return this;
        }

        public Builder remark(String remark) {
            this.remark = remark;
            return this;
        }

        public Builder createId(Long createId) {
            this.createId = createId;
            return this;
        }

        public Builder createName(String createName) {
            this.createName = createName;
            return this;
        }

        public Builder createTime(LocalDateTime createTime) {
            this.createTime = createTime;
            return this;
        }

        public Builder updateId(Long updateId) {
            this.updateId = updateId;
            return this;
        }

        public Builder updateTime(LocalDateTime updateTime) {
            this.updateTime = updateTime;
            return this;
        }

        public LindiSubsidyApplicationTownPaymentVO build() {
            return new LindiSubsidyApplicationTownPaymentVO(
                    subsidyApplicationId,
                    subsidyApplicationTownPaymentId,
                    subsidyApplicationPayNoticeId,
                    townName,
                    acceptAcreage,
                    totalAmount,
                    paymentRadio,
                    currentPaymentAmount,
                    remark,
                    createId,
                    createName,
                    createTime,
                    updateId,
                    updateTime
            );
        }
    }
}